.ql-container {
  box-sizing: border-box;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 13px;
  height: 100%;
  margin: 0;
  position: relative;

  &.ql-disabled {
    .ql-tooltip {
      visibility: hidden;
    }

    .ql-editor ul[data-checked] > li::before {
      pointer-events: none;
    }

    .ql-editor.ql-blank::before {
      cursor: not-allowed;
    }
  }

  &.ql-bubble:not(.ql-disabled) {
    a {
      position: relative;
      white-space: nowrap;

      &::before {
        background-color: #444;
        border-radius: 15px;
        top: -5px;
        font-size: 12px;
        color: #fff;
        content: attr(href);
        font-weight: normal;
        overflow: hidden;
        padding: 5px 15px;
        text-decoration: none;
        z-index: 1;
      }

      &::after {
        border-top: 6px solid #444;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        top: 0;
        content: ' ';
        height: 0;
        width: 0;
      }

      &::before,
      &::after {
        left: 0;
        margin-left: 50%;
        position: absolute;
        transform: translate(-50%, -100%);
        transition: visibility 0s ease 200ms;
        visibility: hidden;
      }

      &:hover::before,
      &:hover::after {
        visibility: visible;
      }
    }
  }
}

.ql-clipboard {
  left: -100000px;
  height: 1px;
  overflow-y: hidden;
  position: absolute;
  top: 50%;

  p {
    margin: 0;
    padding: 0;
  }
}

.quill-editor.ql-editor {
  overflow: initial;
  padding: 0;
  &.is-display-only {
    padding: 14px 0;
  }
}
.ql-editor {
  box-sizing: border-box;
  line-height: 1.42;
  height: 100%;
  outline: none;
  overflow-y: auto;
  padding: 12px 15px;
  tab-size: 4;
  -moz-tab-size: 4;
  text-align: left;
  white-space: pre-line;
  word-wrap: break-word;

  & > * {
    cursor: text;
  }

  p,
  ol,
  ul,
  pre,
  blockquote,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    margin: 0;
    padding: 0;
    counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8
      list-9;
  }

  ol,
  ul {
    padding-left: 1.5em;

    li {
      list-style-type: none;
    }

    li:not(.ql-direction-rtl) {
      padding-left: 1.5em;
    }

    li.ql-direction-rtl {
      padding-right: 1.5em;
    }
  }

  ul {
    & > li::before {
      content: '\2022';
    }

    &[data-checked='true'],
    &[data-checked='false'] {
      pointer-events: none;

      & > li * {
        pointer-events: all;
      }

      & > li::before {
        color: #777;
        cursor: pointer;
        pointer-events: all;
      }
    }

    &[data-checked='true'] > li::before {
      content: '\2611';
    }

    &[data-checked='false'] > li::before {
      content: '\2610';
    }
  }

  ol {
    li {
      counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8
        list-9;
      counter-increment: list-0;

      &:before {
        content: counter(list-0, decimal) '. ';
      }

      &.ql-indent-1 {
        counter-increment: list-1;
        counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;

        &:before {
          content: counter(list-1, lower-alpha) '. ';
        }
      }

      &.ql-indent-2 {
        counter-increment: list-2;
        counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;

        &:before {
          content: counter(list-2, lower-roman) '. ';
        }
      }

      &.ql-indent-3 {
        counter-increment: list-3;
        counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;

        &:before {
          content: counter(list-3, decimal) '. ';
        }
      }

      &.ql-indent-4 {
        counter-increment: list-4;
        counter-reset: list-5 list-6 list-7 list-8 list-9;

        &:before {
          content: counter(list-4, lower-alpha) '. ';
        }
      }

      &.ql-indent-5 {
        counter-increment: list-5;
        counter-reset: list-6 list-7 list-8 list-9;

        &:before {
          content: counter(list-5, lower-roman) '. ';
        }
      }

      &.ql-indent-6 {
        counter-increment: list-6;
        counter-reset: list-7 list-8 list-9;

        &:before {
          content: counter(list-6, decimal) '. ';
        }
      }

      &.ql-indent-7 {
        counter-increment: list-7;
        counter-reset: list-8 list-9;

        &:before {
          content: counter(list-7, lower-alpha) '. ';
        }
      }

      &.ql-indent-8 {
        counter-increment: list-8;
        counter-reset: list-9;

        &:before {
          content: counter(list-8, lower-roman) '. ';
        }
      }

      &.ql-indent-9 {
        counter-increment: list-9;

        &:before {
          content: counter(list-9, decimal) '. ';
        }
      }
    }
  }

  li {
    &::before {
      display: inline-block;
      white-space: nowrap;
      width: 1.2em;
    }

    &:not(.ql-direction-rtl)::before {
      margin-left: -1.5em;
      margin-right: 0.3em;
      text-align: right;
    }

    &.ql-direction-rtl::before {
      margin-left: 0.3em;
      margin-right: -1.5em;
    }

    &.ql-indent-1:not(.ql-direction-rtl) {
      padding-left: 4.5em;
    }

    &.ql-indent-1.ql-direction-rtl.ql-align-right {
      padding-right: 4.5em;
    }

    &.ql-indent-2:not(.ql-direction-rtl) {
      padding-left: 7.5em;
    }

    &.ql-indent-2.ql-direction-rtl.ql-align-right {
      padding-right: 7.5em;
    }

    &.ql-indent-3:not(.ql-direction-rtl) {
      padding-left: 10.5em;
    }

    &.ql-indent-3.ql-direction-rtl.ql-align-right {
      padding-right: 10.5em;
    }

    &.ql-indent-4:not(.ql-direction-rtl) {
      padding-left: 13.5em;
    }

    &.ql-indent-4.ql-direction-rtl.ql-align-right {
      padding-right: 13.5em;
    }

    &.ql-indent-5:not(.ql-direction-rtl) {
      padding-left: 16.5em;
    }

    &.ql-indent-5.ql-direction-rtl.ql-align-right {
      padding-right: 16.5em;
    }

    &.ql-indent-6:not(.ql-direction-rtl) {
      padding-left: 19.5em;
    }

    &.ql-indent-6.ql-direction-rtl.ql-align-right {
      padding-right: 19.5em;
    }

    &.ql-indent-7:not(.ql-direction-rtl) {
      padding-left: 22.5em;
    }

    &.ql-indent-7.ql-direction-rtl.ql-align-right {
      padding-right: 22.5em;
    }

    &.ql-indent-8:not(.ql-direction-rtl) {
      padding-left: 25.5em;
    }

    &.ql-indent-8.ql-direction-rtl.ql-align-right {
      padding-right: 25.5em;
    }

    &.ql-indent-9:not(.ql-direction-rtl) {
      padding-left: 28.5em;
    }

    &.ql-indent-9.ql-direction-rtl.ql-align-right {
      padding-right: 28.5em;
    }
  }

  .ql-indent-1:not(.ql-direction-rtl) {
    padding-left: 3em;
  }

  .ql-indent-1.ql-direction-rtl.ql-align-right {
    padding-right: 3em;
  }

  .ql-indent-2:not(.ql-direction-rtl) {
    padding-left: 6em;
  }

  .ql-indent-2.ql-direction-rtl.ql-align-right {
    padding-right: 6em;
  }

  .ql-indent-3:not(.ql-direction-rtl) {
    padding-left: 9em;
  }

  .ql-indent-3.ql-direction-rtl.ql-align-right {
    padding-right: 9em;
  }

  .ql-indent-4:not(.ql-direction-rtl) {
    padding-left: 12em;
  }

  .ql-indent-4.ql-direction-rtl.ql-align-right {
    padding-right: 12em;
  }

  .ql-indent-5:not(.ql-direction-rtl) {
    padding-left: 15em;
  }

  .ql-indent-5.ql-direction-rtl.ql-align-right {
    padding-right: 15em;
  }

  .ql-indent-6:not(.ql-direction-rtl) {
    padding-left: 18em;
  }

  .ql-indent-6.ql-direction-rtl.ql-align-right {
    padding-right: 18em;
  }

  .ql-indent-7:not(.ql-direction-rtl) {
    padding-left: 21em;
  }

  .ql-indent-7.ql-direction-rtl.ql-align-right {
    padding-right: 21em;
  }

  .ql-indent-8:not(.ql-direction-rtl) {
    padding-left: 24em;
  }

  .ql-indent-8.ql-direction-rtl.ql-align-right {
    padding-right: 24em;
  }

  .ql-indent-9:not(.ql-direction-rtl) {
    padding-left: 27em;
  }

  .ql-indent-9.ql-direction-rtl.ql-align-right {
    padding-right: 27em;
  }

  .ql-video {
    display: block;
    max-width: 100%;

    &.ql-align-center {
      margin: 0 auto;
    }

    &.ql-align-right {
      margin: 0 0 0 auto;
    }
  }

  .ql-bg-black {
    background-color: #000;
  }

  .ql-bg-red {
    background-color: #e60000;
  }

  .ql-bg-orange {
    background-color: #f90;
  }

  .ql-bg-yellow {
    background-color: #ff0;
  }

  .ql-bg-green {
    background-color: #008a00;
  }

  .ql-bg-blue {
    background-color: #06c;
  }

  .ql-bg-purple {
    background-color: #93f;
  }

  .ql-color-white {
    color: #fff;
  }

  .ql-color-red {
    color: #e60000;
  }

  .ql-color-orange {
    color: #f90;
  }

  .ql-color-yellow {
    color: #ff0;
  }

  .ql-color-green {
    color: #008a00;
  }

  .ql-color-blue {
    color: #06c;
  }

  .ql-color-purple {
    color: #93f;
  }

  .ql-font-serif {
    font-family: Georgia, 'Times New Roman', serif;
  }

  .ql-font-monospace {
    font-family: Monaco, 'Courier New', monospace;
  }

  .ql-size-small {
    font-size: 0.75em;
  }

  .ql-size-large {
    font-size: 1.5em;
  }

  .ql-size-huge {
    font-size: 2.5em;
  }

  .ql-direction-rtl {
    direction: rtl;
    text-align: inherit;
  }

  .ql-align-center {
    text-align: center;
  }

  .ql-align-justify {
    text-align: justify;
  }

  .ql-align-right {
    text-align: right;
  }

  &.ql-blank::before {
    color: #999;
    content: attr(data-placeholder);
    font-style: italic;
    position: absolute;
    left: 15px;
    right: 15px;
    line-height: 1.7em;
  }
}

.quill-editor.is-display-only {
  .ql-toolbar.ql-snow {
    display: none;
 
    & + .ql-container.ql-snow {
      border-top: 1px solid #d9d9d9;
      margin: -15px 0;
    }
  }
}

.ql-bubble {
  &,
  & * {
    box-sizing: border-box;
  }

  &.ql-container {
    border: 1px solid #d9d9d9;
    border-radius: 2px;
  }

  .ql-toolbar {
    padding-left: 8px;
  }

  &.ql-toolbar,
  .ql-toolbar {
    &:after {
      clear: both;
      content: '';
      display: table;
    }

    button {
      background: none;
      border: none;
      cursor: pointer;
      float: left;
      height: 24px;
      padding: 3px 5px;
      width: 28px;

      svg {
        float: left;
        height: 100%;
        &.icon {
          fill: #ccc;
          font-size: 18px;
        }
      }

      &:active:hover {
        outline: none;
      }

      &:hover .icon {
        fill: #fff;
      }
    }

    input.ql-image[type='file'] {
      display: none;
    }

    button:hover,
    button:focus,
    button.ql-active,
    .ql-picker-label:hover,
    .ql-picker-label.ql-active,
    .ql-picker-item:hover,
    .ql-picker-item.ql-selected {
      color: #fff;

      .ql-fill,
      .ql-stroke.ql-fill {
        fill: #fff;
      }

      .ql-stroke,
      .ql-stroke-miter {
        stroke: #fff;
      }
    }
  }

  .ql-hidden {
    display: none;
  }

  .ql-out-bottom,
  .ql-out-top {
    visibility: hidden;
  }

  .ql-tooltip {
    position: absolute;
    transform: translateY(10px);

    a {
      cursor: pointer;
      text-decoration: none;
    }

    &.ql-flip {
      transform: translateY(-10px);
    }
  }

  .ql-formats {
    display: inline-block;
    vertical-align: middle;

    &:after {
      clear: both;
      content: '';
      display: table;
    }
  }

  .ql-stroke {
    fill: none;
    stroke: #ccc;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
  }

  .ql-stroke-miter {
    fill: none;
    stroke: #ccc;
    stroke-miterlimit: 10;
    stroke-width: 2;
  }

  .ql-fill,
  .ql-stroke.ql-fill {
    fill: #ccc;
  }

  .ql-empty {
    fill: none;
  }

  .ql-even {
    fill-rule: evenodd;
  }

  .ql-thin,
  .ql-stroke.ql-thin {
    stroke-width: 1;
  }

  .ql-transparent {
    opacity: 0.4;
  }

  .ql-direction {
    svg:last-child {
      display: none;
    }

    &.ql-active {
      svg:last-child {
        display: inline;
      }

      svg:first-child {
        display: none;
      }
    }
  }

  .ql-editor {
    h1 {
      font-size: 2em;
    }

    h2 {
      font-size: 1.5em;
    }

    h3 {
      font-size: 1.17em;
    }

    h4 {
      font-size: 1em;
    }

    h5 {
      font-size: 0.83em;
    }

    h6 {
      font-size: 0.67em;
    }

    a {
      text-decoration: underline;
    }

    blockquote {
      border-left: 4px solid #ccc;
      margin-bottom: 5px;
      margin-top: 5px;
      padding-left: 16px;
    }

    code,
    pre {
      background-color: #f0f0f0;
      border-radius: 3px;
    }

    pre {
      white-space: pre-wrap;
      margin-bottom: 5px;
      margin-top: 5px;
      padding: 5px 10px;

      &.ql-syntax {
        background-color: #23241f;
        color: #f8f8f2;
        overflow: visible;
      }
    }

    code {
      font-size: 85%;
      padding: 2px 4px;
    }

    img {
      max-width: 100%;
    }
  }

  .ql-picker {
    color: #ccc;
    float: left;
    font-size: 14px;
    font-weight: 500;
    height: 24px;
    line-height: 24px;
    position: relative;
    vertical-align: middle;

    &:not(.ql-color-picker):not(.ql-icon-picker) svg {
      position: absolute;
      margin-top: -9px;
      right: 0;
      top: 50%;
      width: 18px;
    }

    &.ql-header,
    &.ql-font,
    &.ql-size {
      .ql-picker-label[data-label]:not([data-label=''])::before,
      .ql-picker-item[data-label]:not([data-label=''])::before {
        content: attr(data-label);
      }
    }

    &.ql-header {
      width: 98px;

      .ql-picker-label::before,
      .ql-picker-item::before {
        content: 'Normal';
      }

      .ql-picker-label[data-value='1']::before,
      .ql-picker-item[data-value='1']::before {
        content: 'Heading 1';
      }

      .ql-picker-label[data-value='2']::before,
      .ql-picker-item[data-value='2']::before {
        content: 'Heading 2';
      }

      .ql-picker-label[data-value='3']::before,
      .ql-picker-item[data-value='3']::before {
        content: 'Heading 3';
      }

      .ql-picker-label[data-value='4']::before,
      .ql-picker-item[data-value='4']::before {
        content: 'Heading 4';
      }

      .ql-picker-label[data-value='5']::before,
      .ql-picker-item[data-value='5']::before {
        content: 'Heading 5';
      }

      .ql-picker-label[data-value='6']::before,
      .ql-picker-item[data-value='6']::before {
        content: 'Heading 6';
      }

      .ql-picker-item[data-value='1']::before {
        font-size: 2em;
      }

      .ql-picker-item[data-value='2']::before {
        font-size: 1.5em;
      }

      .ql-picker-item[data-value='3']::before {
        font-size: 1.17em;
      }

      .ql-picker-item[data-value='4']::before {
        font-size: 1em;
      }

      .ql-picker-item[data-value='5']::before {
        font-size: 0.83em;
      }

      .ql-picker-item[data-value='6']::before {
        font-size: 0.67em;
      }
    }

    &.ql-font {
      width: 108px;

      .ql-picker-label::before,
      .ql-picker-item::before {
        content: 'Sans Serif';
      }

      .ql-picker-label[data-value='serif']::before,
      .ql-picker-item[data-value='serif']::before {
        content: 'Serif';
      }

      .ql-picker-label[data-value='monospace']::before,
      .ql-picker-item[data-value='monospace']::before {
        content: 'Monospace';
      }

      .ql-picker-item[data-value='serif']::before {
        font-family: Georgia, 'Times New Roman', serif;
      }

      .ql-picker-item[data-value='monospace']::before {
        font-family: Monaco, 'Courier New', monospace;
      }
    }

    &.ql-size {
      width: 98px;

      .ql-picker-label::before,
      .ql-picker-item::before {
        content: 'Normal';
      }

      .ql-picker-label[data-value='small']::before,
      .ql-picker-item[data-value='small']::before {
        content: 'Small';
      }

      .ql-picker-label[data-value='large']::before,
      .ql-picker-item[data-value='large']::before {
        content: 'large';
      }

      .ql-picker-label[data-value='huge']::before,
      .ql-picker-item[data-value='huge']::before {
        content: 'huge';
      }

      .ql-picker-item[data-value='small']::before {
        font-size: 10px;
      }

      .ql-picker-item[data-value='large']::before {
        font-size: 18px;
      }

      .ql-picker-item[data-value='huge']::before {
        font-size: 32px;
      }
    }
  }

  .ql-picker-label {
    cursor: pointer;
    display: inline-block;
    height: 100%;
    padding-left: 8px;
    padding-right: 2px;
    position: relative;
    width: 100%;

    &::before {
      display: inline-block;
      line-height: 22px;
    }
  }

  .ql-picker-options {
    background-color: #444;
    display: none;
    min-width: 100%;
    padding: 4px 8px;
    position: absolute;
    white-space: nowrap;

    .ql-picker-item {
      cursor: pointer;
      display: block;
      padding-bottom: 5px;
      padding-top: 5px;
      outline: none;
    }
  }

  .ql-picker.ql-expanded {
    .ql-picker-label {
      color: #777;
      z-index: 2;

      .ql-fill {
        fill: #777;
      }

      .ql-stroke {
        stroke: #777;
      }
    }

    .ql-picker-options {
      display: block;
      margin-top: -1px;
      top: 100%;
      z-index: 1;
    }
  }

  .ql-color-picker,
  .ql-icon-picker {
    width: 28px;

    .ql-picker-label {
      padding: 2px 4px;

      svg {
        right: 4px;
      }
    }
  }

  .ql-icon-picker {
    .ql-picker-options {
      padding: 4px 0px;
    }

    .ql-picker-item {
      height: 24px;
      width: 24px;
      padding: 2px 4px;
    }
  }

  .ql-color-picker {
    .ql-picker-options {
      padding: 3px 5px;
      width: 152px;
    }

    .ql-picker-item {
      border: 1px solid transparent;
      float: left;
      height: 16px;
      margin: 2px;
      padding: 0px;
      width: 16px;
    }

    &.ql-background .ql-picker-item {
      background-color: #fff;
    }

    &.ql-color .ql-picker-item {
      background-color: #000;
    }

    svg {
      margin: 1px;
    }

    .ql-picker-item.ql-selected,
    .ql-picker-item:hover {
      border-color: #fff;
    }
  }

  .ql-toolbar {
    .ql-formats {
      margin: 8px 12px 8px 0px;

      &:first-child {
        margin-left: 12px;
      }
    }
  }

  .ql-tooltip {
    background-color: #444;
    border-radius: 6px;
    color: #fff;
    z-index: 99;
  }

  .ql-tooltip-arrow {
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    content: ' ';
    display: block;
    left: 50%;
    margin-left: -6px;
    position: absolute;
  }

  .ql-tooltip:not(.ql-flip) .ql-tooltip-arrow {
    border-bottom: 6px solid #444;
    top: -6px;
  }

  .ql-tooltip.ql-flip .ql-tooltip-arrow {
    border-top: 6px solid #444;
    bottom: -6px;
  }

  .ql-tooltip.ql-editing {
    .ql-tooltip-editor {
      display: block;
    }

    .ql-formats {
      visibility: hidden;
    }
  }

  .ql-tooltip-editor {
    display: none;

    input[type='text'] {
      background: transparent;
      border: none;
      color: #fff;
      font-size: 13px;
      height: 100%;
      outline: none;
      padding: 10px 20px;
      position: absolute;
      width: 100%;
    }

    a {
      top: 10px;
      position: absolute;
      right: 20px;

      &:before {
        color: #ccc;
        content: '\D7';
        font-size: 16px;
        font-weight: bold;
      }
    }
  }
}

@media (pointer: coarse) {
  .ql-bubble {
    &.ql-toolbar,
    .ql-toolbar {
      button:hover:not(.ql-active) {
        color: #ccc;

        .ql-fill,
        .ql-stroke.ql-fill {
          fill: #ccc;
        }

        .ql-stroke,
        .ql-stroke-miter {
          stroke: #ccc;
        }
      }
    }
  }
}

.ql-snow {
  &,
  & * {
    box-sizing: border-box;
  }

  &.ql-toolbar,
  .ql-toolbar {
    &:after {
      clear: both;
      content: '';
      display: table;
    }

    button {
      background: none;
      border: none;
      cursor: pointer;
      float: left;
      height: 24px;
      padding: 3px 5px;
      width: 28px;

      svg {
        float: left;
        height: 100%;
        &.icon {
          font-size: 18px;
        }
      }

      &:active:hover {
        outline: none;
      }
    }

    input.ql-image[type='file'] {
      display: none;
    }

    button:hover,
    button:focus,
    button.ql-active,
    .ql-picker-label:hover,
    .ql-picker-label.ql-active,
    .ql-picker-item:hover,
    .ql-picker-item.ql-selected {
      color: #06c;

      .ql-fill,
      .ql-stroke.ql-fill {
        fill: #06c;
      }

      .ql-stroke,
      .ql-stroke-miter {
        stroke: #06c;
      }
    }
  }

  .ql-hidden {
    display: none;
  }

  .ql-out-bottom,
  .ql-out-top {
    visibility: hidden;
  }

  .ql-tooltip {
    position: absolute;
    transform: translateY(10px);

    a {
      cursor: pointer;
      text-decoration: none;
    }

    &.ql-flip {
      transform: translateY(-10px);
    }
  }

  .ql-formats {
    display: inline-block;
    vertical-align: middle;

    &:after {
      clear: both;
      content: '';
      display: table;
    }
  }

  .ql-stroke {
    fill: none;
    stroke: #444;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
  }

  .ql-stroke-miter {
    fill: none;
    stroke: #444;
    stroke-miterlimit: 10;
    stroke-width: 2;
  }

  .ql-fill,
  .ql-stroke.ql-fill {
    fill: #444;
  }

  .ql-empty {
    fill: none;
  }

  .ql-even {
    fill-rule: evenodd;
  }

  .ql-thin,
  .ql-stroke.ql-thin {
    stroke-width: 1;
  }

  .ql-transparent {
    opacity: 0.4;
  }

  .ql-direction {
    svg:last-child {
      display: none;
    }

    &.ql-active {
      svg:last-child {
        display: inline;
      }

      svg:first-child {
        display: none;
      }
    }
  }

  .ql-editor {
    h1 {
      font-size: 2em;
    }

    h2 {
      font-size: 1.5em;
    }

    h3 {
      font-size: 1.17em;
    }

    h4 {
      font-size: 1em;
    }

    h5 {
      font-size: 0.83em;
    }

    h6 {
      font-size: 0.67em;
    }

    a {
      text-decoration: underline;
    }

    blockquote {
      border-left: 4px solid #ccc;
      margin-bottom: 5px;
      margin-top: 5px;
      padding-left: 16px;
    }

    code,
    pre {
      background-color: #f0f0f0;
      border-radius: 3px;
    }

    pre {
      white-space: pre-wrap;
      margin-bottom: 5px;
      margin-top: 5px;
      padding: 5px 10px;

      &.ql-syntax {
        background-color: #23241f;
        color: #f8f8f2;
        overflow: visible;
      }
    }

    code {
      font-size: 85%;
      padding: 2px 4px;
    }

    img {
      max-width: 100%;
    }
  }

  .ql-picker {
    color: #444;
    float: left;
    font-size: 14px;
    font-weight: 500;
    height: 24px;
    line-height: 24px;
    position: relative;
    vertical-align: middle;

    &.ql-expanded {
      .ql-picker-label {
        color: #ccc;
        z-index: 2;

        .ql-fill {
          fill: #ccc;
        }

        .ql-stroke {
          stroke: #ccc;
        }
      }

      .ql-picker-options {
        display: block;
        margin-top: -1px;
        top: 100%;
        z-index: 1;
      }
    }

    &:not(.ql-color-picker):not(.ql-icon-picker) svg {
      position: absolute;
      margin-top: -9px;
      right: 0;
      top: 50%;
      width: 18px;
    }

    &.ql-header,
    &.ql-font,
    &.ql-size {
      .ql-picker-label[data-label]:not([data-label=''])::before,
      .ql-picker-item[data-label]:not([data-label=''])::before {
        content: attr(data-label);
      }
    }

    &.ql-header {
      width: 98px;

      .ql-picker-label::before,
      .ql-picker-item::before {
        content: 'Normal';
      }

      .ql-picker-label[data-value='1']::before,
      .ql-picker-item[data-value='1']::before {
        content: 'Heading 1';
      }

      .ql-picker-label[data-value='2']::before,
      .ql-picker-item[data-value='2']::before {
        content: 'Heading 2';
      }

      .ql-picker-label[data-value='3']::before,
      .ql-picker-item[data-value='3']::before {
        content: 'Heading 3';
      }

      .ql-picker-label[data-value='4']::before,
      .ql-picker-item[data-value='4']::before {
        content: 'Heading 4';
      }

      .ql-picker-label[data-value='5']::before,
      .ql-picker-item[data-value='5']::before {
        content: 'Heading 5';
      }

      .ql-picker-label[data-value='6']::before,
      .ql-picker-item[data-value='6']::before {
        content: 'Heading 6';
      }

      .ql-picker-item[data-value='1']::before {
        font-size: 2em;
      }

      .ql-picker-item[data-value='2']::before {
        font-size: 1.5em;
      }

      .ql-picker-item[data-value='3']::before {
        font-size: 1.17em;
      }

      .ql-picker-item[data-value='4']::before {
        font-size: 1em;
      }

      .ql-picker-item[data-value='5']::before {
        font-size: 0.83em;
      }

      .ql-picker-item[data-value='6']::before {
        font-size: 0.67em;
      }
    }

    &.ql-font {
      width: 108px;

      .ql-picker-label::before,
      .ql-picker-item::before {
        content: 'Sans Serif';
      }

      .ql-picker-label[data-value='serif']::before,
      .ql-picker-item[data-value='serif']::before {
        content: 'Serif';
      }

      .ql-picker-label[data-value='monospace']::before,
      .ql-picker-item[data-value='monospace']::before {
        content: 'Monospace';
      }

      .ql-picker-item[data-value='serif']::before {
        font-family: Georgia, 'Times New Roman', serif;
      }

      .ql-picker-item[data-value='monospace']::before {
        font-family: Monaco, 'Courier New', monospace;
      }
    }

    &.ql-size {
      width: 98px;

      .ql-picker-label::before,
      .ql-picker-item::before {
        content: 'Normal';
      }

      .ql-picker-label[data-value='small']::before,
      .ql-picker-item[data-value='small']::before {
        content: 'Small';
      }

      .ql-picker-label[data-value='large']::before,
      .ql-picker-item[data-value='large']::before {
        content: 'Large';
      }

      .ql-picker-label[data-value='huge']::before,
      .ql-picker-item[data-value='huge']::before {
        content: 'Huge';
      }

      .ql-picker-item[data-value='small']::before {
        font-size: 10px;
      }

      .ql-picker-item[data-value='large']::before {
        font-size: 18px;
      }

      .ql-picker-item[data-value='huge']::before {
        font-size: 32px;
      }
    }
  }

  .ql-picker-label {
    cursor: pointer;
    display: inline-block;
    height: 100%;
    padding-left: 8px;
    padding-right: 2px;
    position: relative;
    width: 100%;

    &::before {
      display: inline-block;
      line-height: 22px;
    }
  }

  .ql-picker-options {
    background-color: #fff;
    display: none;
    min-width: 100%;
    padding: 4px 8px;
    position: absolute;
    white-space: nowrap;

    .ql-picker-item {
      cursor: pointer;
      display: block;
      padding-bottom: 5px;
      padding-top: 5px;
      outline: none;
    }
  }

  .ql-color-picker,
  .ql-icon-picker {
    width: 28px;

    .ql-picker-label {
      padding: 2px 4px;

      svg {
        right: 4px;
      }
    }
  }

  .ql-icon-picker {
    .ql-picker-options {
      padding: 4px 0px;
    }

    .ql-picker-item {
      height: 24px;
      width: 24px;
      padding: 2px 4px;
    }
  }

  .ql-color-picker {
    .ql-picker-options {
      padding: 3px 5px;
      width: 152px;
    }

    .ql-picker-item {
      border: 1px solid transparent;
      float: left;
      height: 16px;
      margin: 2px;
      padding: 0px;
      width: 16px;
    }

    &.ql-background .ql-picker-item {
      background-color: #fff;
    }

    &.ql-color .ql-picker-item {
      background-color: #000;
    }
  }

  &.ql-toolbar {
    border: 1px solid #d9d9d9;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
    padding: 8px;

    .ql-formats {
      margin-right: 15px;
    }

    .ql-picker-label {
      border: 1px solid transparent;
      outline: none;
    }

    .ql-picker-options {
      border: 1px solid transparent;
      box-shadow: rgba(0, 0, 0, 0.2) 0 2px 8px;
    }

    .ql-picker.ql-expanded {
      .ql-picker-label {
        border-color: #ccc;
      }

      .ql-picker-options {
        border-color: #ccc;
      }
    }

    .ql-color-picker .ql-picker-item.ql-selected,
    .ql-color-picker .ql-picker-item:hover {
      border-color: #000;
    }

    & + .ql-container.ql-snow {
      border-top: 0px;
    }
  }

  .ql-tooltip {
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 0px 0px 5px #ddd;
    color: #444;
    padding: 5px 12px;
    white-space: nowrap;

    &::before {
      content: 'Visit URL:';
      line-height: 26px;
      margin-right: 8px;
    }

    input[type='text'] {
      display: none;
      border: 1px solid #ccc;
      font-size: 13px;
      height: 26px;
      margin: 0px;
      padding: 3px 5px;
      width: 170px;
    }

    a.ql-preview {
      display: inline-block;
      max-width: 200px;
      overflow-x: hidden;
      text-overflow: ellipsis;
      vertical-align: top;
    }

    a.ql-action::after {
      border-right: 1px solid #ccc;
      content: 'Edit';
      margin-left: 16px;
      padding-right: 8px;
    }

    a.ql-remove::before {
      content: 'Remove';
      margin-left: 8px;
    }

    a {
      line-height: 26px;
    }

    &.ql-editing {
      a.ql-preview,
      a.ql-remove {
        display: none;
      }

      input[type='text'] {
        display: inline-block;
      }

      a.ql-action::after {
        border-right: 0px;
        content: 'Save';
        padding-right: 0px;
      }
    }

    &[data-mode='link']::before {
      content: 'Enter link:';
    }

    &[data-mode='formula']::before {
      content: 'Enter formula:';
    }

    &[data-mode='video']::before {
      content: 'Enter video:';
    }
  }

  a {
    color: #06c;
  }

  &.ql-container {
    border: 1px solid #d9d9d9;
  }
}

@media (pointer: coarse) {
  .ql-snow {
    &.ql-toolbar,
    .ql-toolbar {
      button:hover:not(.ql-active) {
        color: #444;
      }

      .ql-fill,
      .ql-stroke.ql-fill {
        fill: #444;
      }

      .ql-stroke,
      .ql-stroke-miter {
        stroke: #444;
      }
    }
  }
}

.toolbar-icon {
  position: absolute;
  left: -9999px;
  opacity: 0;
  z-index: -1;
  width: 0;
  height: 0;
}

.ql-editor table {
  table-layout: fixed;
  max-width: 100%;
  border-collapse: collapse;
}
.ql-editor table td {
  outline: none;
}
.ql-editor td {
  border: 1px solid #000;
  padding: 2px 5px;
}
.ql-formats {
  .ql-size {
    &.ql-picker {
      span.ql-picker-label[data-value]:before,
      .ql-picker-options>span.ql-picker-item[data-value]:before{
        content: attr(data-value);
      }
    }
  }
}
